#include<iostream>
using namespace std;

int main()
{
	double q = 2;
	double p = 1;
	double sum = 0;
	int q2,p2;
	int n = 0;
	cin >> n;
	for(int i = 1;i <= n;i++)
	{
		sum += q / p;//q=2 p=1
		q = q + p;//q=3 p=1
		p = q - p;//p=2 q=3
		
	}
	printf("%.4f",sum);
	return 0;
}
